/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.goods.service;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.goods.dao.ZtGoodsOrderDao;
import com.jeesite.modules.goods.entity.ZtGoodsOrder;

/**
 * 测试数据Service
 * 
 * @author ThinkGem
 * @version 2018-04-22
 */
@Service
@Transactional(readOnly = true)
public class ZtGoodsOrderService extends CrudService<ZtGoodsOrderDao, ZtGoodsOrder> {

	/**
	 * 获取单条数据
	 * 
	 * @param testData
	 * @return
	 */
	@Override
	public ZtGoodsOrder get(ZtGoodsOrder ztGoodsOrder) {
		ZtGoodsOrder entity = super.get(ztGoodsOrder);
		if (entity == null) {
			entity = new ZtGoodsOrder();
		}
		return entity;
	}

	public ZtGoodsOrder getByOrder(ZtGoodsOrder ztGoodsOrder) {
		return dao.getByOrder(ztGoodsOrder);
	}
	
	public ZtGoodsOrder getOrder(ZtGoodsOrder ztGoodsOrder) {
		return dao.getOrder(ztGoodsOrder);
	}
	
	
	public Integer getNum(ZtGoodsOrder ztGoodsOrder) {
		return dao.getNum(ztGoodsOrder);
	}
	
	public List<ZtGoodsOrder> getListByOrder(ZtGoodsOrder ztGoodsOrder) {
		return dao.getListByOrder(ztGoodsOrder);
	}
	
	public List<ZtGoodsOrder> getJSAll(ZtGoodsOrder ztGoodsOrder) {
		return dao.getJSAll(ztGoodsOrder);
	}
	
	
	public List<Map> getByGoods(ZtGoodsOrder ztGoodsOrder) {
		return dao.getByGoods(ztGoodsOrder);
	}
	
	public List<ZtGoodsOrder> findGhMh(ZtGoodsOrder ztGoodsOrder) {
		return dao.findGhMh(ztGoodsOrder);
	}
	public List<ZtGoodsOrder> findwc(ZtGoodsOrder ztGoodsOrder) {
		return dao.findwc(ztGoodsOrder);
	}
	public List<ZtGoodsOrder> findAllOrder(ZtGoodsOrder ztGoodsOrder) {
		return dao.findAllOrder(ztGoodsOrder);
	}
	
	
	public List<ZtGoodsOrder> findListByNew(ZtGoodsOrder ztGoodsOrder) {
		return dao.findListByNew(ztGoodsOrder);
	}

	public List<ZtGoodsOrder> findByOrder(ZtGoodsOrder ztGoodsOrder){
		return dao.findByOrder(ztGoodsOrder);
	}

	/**
	 * 查询分页数据
	 * 
	 * @param page
	 *            分页对象
	 * @param testData
	 * @return
	 */
	@Override
	public Page<ZtGoodsOrder> findPage(Page<ZtGoodsOrder> page, ZtGoodsOrder ztGoodsOrder) {
		return super.findPage(page, ztGoodsOrder);
	}

	/**
	 * 保存数据（插入或更新）
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void save(ZtGoodsOrder ztGoodsOrder) {
		super.save(ztGoodsOrder);
	}
	@Transactional(readOnly = false)
	public void batchUpdate(List<ZtGoodsOrder> list) {
		dao.batchUpdate(list);
	}
	
	@Transactional(readOnly = false)
	public void batchUpdateIsJS(List<ZtGoodsOrder> list) {
		dao.batchUpdateIsJS(list);
	}
	
	
	
	@Transactional(readOnly = false)
	public void batchUpdateState(List<ZtGoodsOrder> list) {
		dao.batchUpdateState(list);
	}
	@Transactional(readOnly = false)
	public void batchUpdateJDOrder(List<ZtGoodsOrder> list) {
		dao.batchUpdateJDOrder(list);
	}
	
	
	
	
	@Transactional(readOnly = false)
	public void batchUpdateChannel(List<ZtGoodsOrder> list) {
		dao.batchUpdateChannel(list);
	}
	
	
	
	@Transactional(readOnly = false)
	public void updateAddr(ZtGoodsOrder ztGoodsOrder) {
		dao.updateAddr(ztGoodsOrder);
	}
	
	
	
	@Transactional(readOnly = false)
	public void updateOrderstatus(ZtGoodsOrder ztGoodsOrder) {
		dao.updateOrderstatus(ztGoodsOrder);

	}
	
	

	/**
	 * 更新状态
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void updateStatus(ZtGoodsOrder ztGoodsOrder) {
		super.updateStatus(ztGoodsOrder);
	}

	/**
	 * 删除数据
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void delete(ZtGoodsOrder ztGoodsOrder) {
		super.delete(ztGoodsOrder);
	}

}